package cn.walls1717.ggkt.live.service.impl;

import cn.walls1717.ggkt.live.mapper.LiveCourseAccountMapper;
import cn.walls1717.ggkt.live.service.LiveCourseAccountService;
import cn.walls1717.ggkt.model.live.LiveCourseAccount;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 直播课程账号表（受保护信息）服务实现类
 *
 * @author walls1717
 * @since 2022/07/23
 */
@Service
public class LiveCourseAccountServiceImpl extends ServiceImpl<LiveCourseAccountMapper, LiveCourseAccount> implements LiveCourseAccountService {

    /**
     * 获取直播账号信息
     */
    @Override
    public LiveCourseAccount getLiveCourseAccountById(Long id) {
        LambdaQueryWrapper<LiveCourseAccount> lqw = new LambdaQueryWrapper<>();
        lqw.eq(LiveCourseAccount::getLiveCourseId, id);
        return this.getOne(lqw);
    }
}
